Skip to content

Add GitHub Copilot setup steps workflow for .NET 9 environment - #6

Merged
Geertvdc merged 3 commits into
mainfrom
copilot/fix-5
Jun 19, 2025
Merged

Add GitHub Copilot setup steps workflow for .NET 9 environment#6
Geertvdc merged 3 commits into
mainfrom
copilot/fix-5

Conversation

Copilot AI commented Jun 19, 2025

Copy link
Copy Markdown
Contributor

This PR adds a GitHub Actions workflow that sets up the development environment for GitHub Copilot coding agents to work with .NET 9, matching the existing devcontainer configuration.

Changes Made

  • Created .github/workflows/copilot-setup-steps.yml workflow file
  • Configured the workflow to use .NET 9.0.x SDK via actions/setup-dotnet@v4
  • Added verification steps to confirm .NET installation
  • Used the required job name copilot-setup-steps for proper Copilot recognition
  • Configured appropriate triggers: workflow_dispatch, push, and pull_request on workflow changes
  • Set minimal permissions (contents: read) for security best practices

Workflow Features

The workflow ensures GitHub Copilot coding agents have access to:

  • .NET 9 SDK environment matching the devcontainer setup
  • Proper verification of the .NET installation
  • Consistent development environment across agent sessions

Testing

  • YAML syntax validated with yamllint
  • Workflow structure verified against GitHub Actions standards
  • Job name and trigger configuration confirmed per GitHub Copilot documentation

This provides GitHub Copilot with the same .NET 9 environment that developers get when using the devcontainer, ensuring consistent coding assistance.

Fixes #5.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Co-authored-by: Geertvdc <8984505+Geertvdc@users.noreply.github.com>
Copilot AI changed the title [WIP] add copilot setup steps so it can use .net 9 Add GitHub Copilot setup steps workflow for .NET 9 environment Jun 19, 2025
Copilot AI requested a review from Geertvdc June 19, 2025 19:57

@Geertvdc Geertvdc left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instead of doing these steps can we use container: instead that uses our devcontainer? this already contains .net 9


# You can define any steps you want, and they will run before the agent
# starts. If you do not check out your code, Copilot will do this for you.
steps:

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't we use the dev container instead of steps that install .net every time?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, good point! Updated the workflow to use the devcontainer image instead of manually installing .NET every time. The workflow now uses container: mcr.microsoft.com/devcontainers/dotnet:1-9.0-bookworm which matches the devcontainer setup. Commit: 825e266

Co-authored-by: Geertvdc <8984505+Geertvdc@users.noreply.github.com>

Copilot AI commented Jun 19, 2025

Copy link
Copy Markdown
Contributor Author

instead of doing these steps can we use container: instead that uses our devcontainer? this already contains .net 9

Changed the workflow to use container: with the same devcontainer image (mcr.microsoft.com/devcontainers/dotnet:1-9.0-bookworm) instead of installing .NET manually. This eliminates the redundant installation steps since the container already includes .NET 9. Commit: 825e266

Copilot AI requested a review from Geertvdc June 19, 2025 20:05

@Geertvdc Geertvdc left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ship it! 🚀

@Geertvdc
Geertvdc marked this pull request as ready for review June 19, 2025 20:11
@Geertvdc
Geertvdc merged commit e15d1cc into main Jun 19, 2025
2 checks passed
@Geertvdc
Geertvdc deleted the copilot/fix-5 branch June 19, 2025 20:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

add copilot setup steps so it can use .net 9

2 participants